﻿# coding=utf-8
import xlwt
import sys

def writeexcel(pro_info):
	file = xlwt.Workbook()
	table = file.add_sheet('sheet_1')
	rownum = 0
	for info in pro_info:
		table.write(rownum, 0, info.name.decode('gbk'))
		table.write(rownum, 1, info.price)
		rownum = rownum + 1

	file.save('sample.xls')